# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ChromeBrowserProfile do
  @moduledoc """
  A representation of a Chrome browser profile.

  ## Attributes

  *   `affiliationState` (*type:* `String.t`, *default:* `nil`) - Output only. The specific affiliation state of the profile.
  *   `annotatedLocation` (*type:* `String.t`, *default:* `nil`) - Optional. Location of the profile annotated by the admin.
  *   `annotatedUser` (*type:* `String.t`, *default:* `nil`) - Optional. User of the profile annotated by the admin.
  *   `attestationCredential` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1AttestationCredential.t`, *default:* `nil`) - Output only. Attestation credential information of the profile.
  *   `browserChannel` (*type:* `String.t`, *default:* `nil`) - Output only. Channel of the browser on which the profile exists.
  *   `browserVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Version of the browser on which the profile exists.
  *   `deviceInfo` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo.t`, *default:* `nil`) - Output only. Basic information of the device on which the profile exists. This information is only available for the affiliated profiles.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. Profile display name set by client.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Output only. Etag of this ChromeBrowserProfile resource. This etag can be used with UPDATE operation to ensure consistency.
  *   `extensionCount` (*type:* `String.t`, *default:* `nil`) - Output only. Number of extensions installed on the profile.
  *   `firstEnrollmentTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the first enrollment of the profile.
  *   `identityProvider` (*type:* `String.t`, *default:* `nil`) - Output only. Identify provider of the profile.
  *   `lastActivityTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the latest activity by the profile.
  *   `lastPolicyFetchTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the latest policy fetch by the profile.
  *   `lastPolicySyncTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the latest policy sync by the profile.
  *   `lastStatusReportTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp of the latest status report by the profile.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Format: customers/{customer_id}/profiles/{profile_permanent_id}
  *   `osPlatformType` (*type:* `String.t`, *default:* `nil`) - Output only. OS platform of the device on which the profile exists.
  *   `osPlatformVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Major OS platform version of the device on which the profile exists, from profile reporting.
  *   `osVersion` (*type:* `String.t`, *default:* `nil`) - Output only. OS version of the device on which the profile exists.
  *   `policyCount` (*type:* `String.t`, *default:* `nil`) - Output only. Number of policies applied on the profile.
  *   `profileId` (*type:* `String.t`, *default:* `nil`) - Output only. Chrome client side profile ID.
  *   `profilePermanentId` (*type:* `String.t`, *default:* `nil`) - Output only. Profile permanent ID is the unique identifier of a profile within one customer.
  *   `reportingData` (*type:* `GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ReportingData.t`, *default:* `nil`) - Output only. Detailed reporting data of the profile. This information is only available when the profile reporting policy is enabled.
  *   `userEmail` (*type:* `String.t`, *default:* `nil`) - Output only. Email address of the user to which the profile belongs.
  *   `userId` (*type:* `String.t`, *default:* `nil`) - Output only. Unique Directory API ID of the user that can be used in Admin SDK Users API.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :affiliationState => String.t() | nil,
          :annotatedLocation => String.t() | nil,
          :annotatedUser => String.t() | nil,
          :attestationCredential =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1AttestationCredential.t()
            | nil,
          :browserChannel => String.t() | nil,
          :browserVersion => String.t() | nil,
          :deviceInfo =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo.t()
            | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :extensionCount => String.t() | nil,
          :firstEnrollmentTime => DateTime.t() | nil,
          :identityProvider => String.t() | nil,
          :lastActivityTime => DateTime.t() | nil,
          :lastPolicyFetchTime => DateTime.t() | nil,
          :lastPolicySyncTime => DateTime.t() | nil,
          :lastStatusReportTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :osPlatformType => String.t() | nil,
          :osPlatformVersion => String.t() | nil,
          :osVersion => String.t() | nil,
          :policyCount => String.t() | nil,
          :profileId => String.t() | nil,
          :profilePermanentId => String.t() | nil,
          :reportingData =>
            GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ReportingData.t()
            | nil,
          :userEmail => String.t() | nil,
          :userId => String.t() | nil
        }

  field(:affiliationState)
  field(:annotatedLocation)
  field(:annotatedUser)

  field(:attestationCredential,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1AttestationCredential
  )

  field(:browserChannel)
  field(:browserVersion)

  field(:deviceInfo,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo
  )

  field(:displayName)
  field(:etag)
  field(:extensionCount)
  field(:firstEnrollmentTime, as: DateTime)
  field(:identityProvider)
  field(:lastActivityTime, as: DateTime)
  field(:lastPolicyFetchTime, as: DateTime)
  field(:lastPolicySyncTime, as: DateTime)
  field(:lastStatusReportTime, as: DateTime)
  field(:name)
  field(:osPlatformType)
  field(:osPlatformVersion)
  field(:osVersion)
  field(:policyCount)
  field(:profileId)
  field(:profilePermanentId)

  field(:reportingData,
    as: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ReportingData
  )

  field(:userEmail)
  field(:userId)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ChromeBrowserProfile do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ChromeBrowserProfile.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1ChromeBrowserProfile do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
